<div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- Messages: style can be found in dropdown.less-->
          <!-- User Account Menu -->
          <li class="dropdown user user-menu">
            <!-- Menu Toggle Button -->
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <!-- The user image in the navbar-->
              <img src="/static/dist/img/logo.jpg" class="user-image" alt="User Image">
              <!-- hidden-xs hides the username on small devices so only the image appears. -->
              <span class="hidden-xs">{{ request.user.username }}</span>
            </a>
            <ul class="dropdown-menu">
              <!-- The user image in the menu -->
              <li class="user-header">
                <img src="/static/dist/img/logo.jpg" class="img-circle" alt="User Image">

                <p>
                    {{ request.user.nickname }}
                    {{ request.user.email }}
                </p>
              </li>
              <!-- Menu Body -->
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-left">
                    {% if request.user.ldap_name %}
                        <a href="{% url 'change_ldap_password' %}" class="btn btn-default btn-flat">变更密码</a>
                    {% else %}
                        <a href="{% url 'change_password' %}" class="btn btn-default btn-flat">变更密码</a>
                    {% endif %}
                </div>
                <div class="pull-right">
                  <a href="{% url "logout" %}" class="btn btn-default btn-flat">退出登录</a>
                </div>
              </li>
            </ul>
          </li>
          <!-- Control Sidebar Toggle Button -->
          <li>
              <p>&nbsp;</p>
          </li>
        </ul>
      </div>
